﻿package geom
{
	import flash.geom.Point;
	
	public class Triangle extends Object
	{
		public var A: Point;
		public var B: Point;
		public var C: Point;
		
		public function Triangle (p1:Point, p2:Point, p3:Point)
		{
			super();
			A = p1;
			B = p2;
			C = p3;
		}
		
		public function square():Number
		{
			return Math.abs((B.x - A.x)*(C.y - A.y) - (C.x - A.x) * (B.y - A.y)) / 2;
		}
	}
}